package com.sl.water.vo;

import cn.hutool.json.JSONArray;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import com.sl.water.dto.ForecastSchemeDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @description:
 * @author: duan
 * @time: 2025-06-13 11:47
 */

@Data
@Schema(description = "预报预警")
@NoArgsConstructor
@AllArgsConstructor
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class YbWarnVO {
    private Rsvr rsvr;
    private River river;
    private Wh wh;


    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
    public static class Rsvr implements Serializable {

        @Schema(
                description = "预测水位"
        )
        private Double z;

        @Schema(
                description = "讯限水位"
        )
        @JsonProperty("z_limit")
        private Double zLimit;

        @Schema(
                description = "距讯限水位"
        )
        @JsonProperty("z_yb")
        private Double zYb;

        @Schema(
                description = "警戒时间"
        )
        private String tm;

    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
    public static class River implements Serializable {

        @Schema(
                description = "预测水位"
        )
        private Double z;

        @Schema(
                description = "讯限水位"
        )
        @JsonProperty("z_limit")
        private Double zLimit;

        @Schema(
                description = "距讯限水位"
        )
        @JsonProperty("z_yb")
        private Double zYb;

        @Schema(
                description = "警戒时间"
        )
        private String tm;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
    public static class Wh implements Serializable {

        @Schema(
                description = "受淹面积"
        )
        private Double mj;

        @Schema(
                description = "影响人口"
        )
        private Integer person;

        @Schema(
                description = "危化企业数量"
        )
        private Integer num;

        @Schema(
                description = "列表"
        )
        private JSONArray list;

    }
}
